package com.micheal.pattern.proxy.staticed;

/**
 * Created by micheal on 2018/3/29/0029.
 * <p>
 * 代理人
 */
public class Agent {

    /**
     * 代理人必须持有被代理人的引用
     */
    private Principal principal;

    public Agent(Principal principal) {
        this.principal = principal;
    }


    public void lookHouse() {
        System.out.println("按照被代理人的要求找的房子！");
        principal.lookHouse();
        System.out.println("您看可以的话，咱们就把租房合同签了吧...");
    }

}
